/*
 * Copyright (c) 2017. 深圳一七科技. All rights reserved.
 */

package com.yiqi.liebang.feature.login.contract;

import com.suozhang.framework.entity.bo.UserInfoBo;
import com.suozhang.framework.framework.BasePresenter;
import com.suozhang.framework.framework.BaseView;
import com.yiqi.liebang.entity.bo.RegisterBo;

import io.reactivex.Observable;

/**
 * LIJUWEN
 *
 * @email yiyayiyayaoljw@gmail.com
 * @date 2018/7/11 9:06
 */
public interface LoginContract {

    interface Model {
        Observable<UserInfoBo> userRegister(RegisterBo registerBo);

        Observable<UserInfoBo> userLogin(RegisterBo registerBo);

        Observable<UserInfoBo> thirdLogin(RegisterBo registerBo);

        Observable<UserInfoBo> userResetPwd(RegisterBo registerBo);

        Observable<RegisterBo> sendCode(RegisterBo registerBo);
    }

    interface View extends BaseView {
        void showReisterSuccess();

        void showLoginSuccess();

        void showThirdLoginSuccess(UserInfoBo userInfoBo);

        void showResetSuccess(UserInfoBo s);

        void showCodeSuccess(RegisterBo s);

        void showError(String error);

    }


    interface Presenter extends BasePresenter {

        void userRegister(String mobile, String code, String pwd, String nick, String registrationId);

        void userLogin(String mobile, String pwd, String registrationId);

        void thirdLogin(String userOpenid, String userName, String registrationId, String head, int type);

        void sendCode(String mobile);

        void userResetPwd(String mobile, String code, String pwd);
    }
}
